const express = require("express");
const router = express.Router();

// 导入 user 路由回调函数
const userHandler = require("../router_handler/user.js");

const expressJoi = require("@escook/express-joi");
const { reg_login_schema } = require("../schema/user.js");

// 用户注册路由
router.post("/register", expressJoi(reg_login_schema), userHandler.register);

// 用户登录路由
router.post("/login", expressJoi(reg_login_schema), userHandler.login);

module.exports = router;
